home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 29
/
Volume 29 - JOGO DISK .iso
/
Games
/
jungle_adventure.swf
/
scripts
/
__Packages
/
CommandBox.as
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
66 lines
class CommandBox extends SSZone
{
var classID = SSGlobal.CLSID_ZONE;
var value = -1;
var localRight = 100;
var localBottom = 100;
var command = "LoseLife";
var editor_isItem = true;
var editor_name = "CommandBox";
var editor_args_names = ["width","height","command"];
var editor_args_values = [CommandBox.prototype.localRight,CommandBox.prototype.localBottom,CommandBox.prototype.command];
var editor_args_types = ["number","number","string"];
var editor_args_options = [[10,4000,10],[10,4000,10],"A-Za-z"];
var editor_args_descriptions = ["","",""];
var editor_args_mode = [0,0,0];
var editor_args_component = ["NumericStepper","NumericStepper","TextInput"];
var editor_canChangeFrame = false;
function CommandBox(w, h, command)
{
super();
if(w)
{
this.localRight = w;
}
if(h)
{
this.localBottom = h;
}
if(command != null)
{
this.command = command;
}
this.init(SSZone.RECT,new Vector(this.localRight,this.localBottom,0));
}
function onCollision(obj)
{
return obj.doCommand(this,this.command);
}
function onAddDisplay()
{
}
function editor_onCreateDisplay(target, external)
{
}
function editor_onDisplay(target, external)
{
target.createTextField("t",20,0,0,100,48);
var _loc3_ = target.t;
var _loc4_ = _loc3_.getNewTextFormat();
_loc4_.size = 20;
_loc4_.color = 16777215;
_loc4_.font = "_sans";
_loc3_.setNewTextFormat(_loc4_);
_loc3_.selectable = false;
_loc3_.text = "Command:\n" + this.command;
target.clear();
target.lineStyle(0,16742348);
target.beginFill(16742348,80);
target.lineTo(this.width,0);
target.lineTo(this.width,this.height);
target.lineTo(0,this.height);
target.lineTo(0,0);
target.endFill();
}
}